home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / AdobeExamples / NX_CtlPoints / ControlViewWraps.c < prev    next >
C/C++ Source or Header  |  1995-06-12  |  19KB  |  558 lines

  1. /* ControlViewWraps.c generated from ControlViewWraps.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "ControlViewWraps.psw"
  9.  
  10. /*
  11.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  12.  *
  13.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  14.  *    System Software Development Kit from Adobe Systems Incorporated,
  15.  *    then this copy is designated as Development Software and its use is
  16.  *    subject to the terms of the License Agreement attached to such Kit.
  17.  *
  18.  * (c)  If this Sample Code is distributed independently, then the following
  19.  *    terms apply:
  20.  *
  21.  * (d)  This file may be freely copied and redistributed as long as:
  22.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  23.  *    2) If the file has been modified in any way, a notice of such
  24.  *      modification is conspicuously indicated.
  25.  *
  26.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  27.  *    Adobe Systems Incorporated.
  28.  * 
  29.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  30.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  31.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  32.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  33.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  34.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  35.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  36.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  37.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  38.  *    OF THIRD PARTY RIGHTS.
  39.  */
  40.  
  41. /*
  42.  *    ControlViewWraps.psw
  43.  *
  44.  *    Version:    2.0
  45.  *    Author:    Ken Fromm
  46.  *    History:
  47.  *            03-07-91        Added this comment.
  48.  */
  49.  
  50. /* StartTime is stored in the interpreter and contains the initial real time    */                                            
  51. #line 52 "ControlViewWraps.c"
  52. void PSWMarkTime( void )
  53. {
  54.   typedef struct {
  55.     unsigned char tokenType;
  56.     unsigned char topLevelCount;
  57.     unsigned short nBytes;
  58.  
  59.     DPSBinObjGeneric obj0;
  60.     DPSBinObjGeneric obj1;
  61.     DPSBinObjGeneric obj2;
  62.     } _dpsQ;
  63.   static const _dpsQ _dpsStat = {
  64.     DPS_DEF_TOKENTYPE, 3, 28,
  65.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* StartTime */
  66.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  67.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  68.     }; /* _dpsQ */
  69.   _dpsQ _dpsF;    /* local copy  */
  70.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  71.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  72.   static long int _dpsCodes[1] = {-1};
  73.   {
  74. if (_dpsCodes[0] < 0) {
  75.     static const char * const _dps_names[] = {
  76.     "StartTime"};
  77.     long int *_dps_nameVals[1];
  78.     _dps_nameVals[0] = &_dpsCodes[0];
  79.  
  80.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  81.     }
  82.   }
  83.  
  84.   _dpsF = _dpsStat;    /* assign automatic variable */
  85.  
  86.   _dpsP[0].val.nameVal = _dpsCodes[0];
  87.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
  88. }
  89. #line 45 "ControlViewWraps.psw"
  90.  
  91.  
  92. /* The difference between the current real time and the initial time stored                */
  93. /* in StartTime is returned to the calling procedure in the output arg ElapsedTime. */
  94. #line 95 "ControlViewWraps.c"
  95. void PSWReturnTime(int *ElapsedTime)
  96. {
  97.   typedef struct {
  98.     unsigned char tokenType;
  99.     unsigned char topLevelCount;
  100.     unsigned short nBytes;
  101.  
  102.     DPSBinObjGeneric obj0;
  103.     DPSBinObjGeneric obj1;
  104.     DPSBinObjGeneric obj2;
  105.     DPSBinObjGeneric obj3;
  106.     DPSBinObjGeneric obj4;
  107.     DPSBinObjGeneric obj5;
  108.     DPSBinObjGeneric obj6;
  109.     DPSBinObjGeneric obj7;
  110.     DPSBinObjGeneric obj8;
  111.     } _dpsQ;
  112.   static const _dpsQ _dpsStat = {
  113.     DPS_DEF_TOKENTYPE, 9, 76,
  114.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  115.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* StartTime */
  116.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  117.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  118.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  119.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  120.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  121.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  122.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},    /* flush */
  123.     }; /* _dpsQ */
  124.   _dpsQ _dpsF;    /* local copy  */
  125.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  126.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  127.   static long int _dpsCodes[1] = {-1};
  128.   DPSResultsRec _dpsR[1];
  129.   static const DPSResultsRec _dpsRstat[] = {
  130.     { dps_tInt, -1 },
  131.     };
  132.     _dpsR[0] = _dpsRstat[0];
  133.     _dpsR[0].value = (char *)ElapsedTime;
  134.  
  135.   {
  136. if (_dpsCodes[0] < 0) {
  137.     static const char * const _dps_names[] = {
  138.     "StartTime"};
  139.     long int *_dps_nameVals[1];
  140.     _dps_nameVals[0] = &_dpsCodes[0];
  141.  
  142.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  143.     }
  144.   }
  145.  
  146.   _dpsF = _dpsStat;    /* assign automatic variable */
  147.  
  148.   _dpsP[1].val.nameVal = _dpsCodes[0];
  149.   DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
  150.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,76);
  151.   DPSAwaitReturnValues(_dpsCurCtxt);
  152. }
  153. #line 52 "ControlViewWraps.psw"
  154.  
  155.  
  156. /*
  157. * This wrap is called in the +newFrame:(NXRect *) frm method to
  158. * define and bind procedures in the interpreter.  These procedures
  159. * are then called from within other wraps.
  160. */
  161. #line 162 "ControlViewWraps.c"
  162. void PSWDefsView(float BGColor, float BGColorStr, float BGWidthStr, float BGrect[])
  163. {
  164.   typedef struct {
  165.     unsigned char tokenType;
  166.     unsigned char topLevelCount;
  167.     unsigned short nBytes;
  168.  
  169.     DPSBinObjGeneric obj0;
  170.     DPSBinObjReal obj1;
  171.     DPSBinObjGeneric obj2;
  172.     DPSBinObjGeneric obj3;
  173.     DPSBinObjReal obj4;
  174.     DPSBinObjGeneric obj5;
  175.     DPSBinObjGeneric obj6;
  176.     DPSBinObjReal obj7;
  177.     DPSBinObjGeneric obj8;
  178.     DPSBinObjGeneric obj9;
  179.     DPSBinObjGeneric obj10;
  180.     DPSBinObjGeneric obj11;
  181.     DPSBinObjGeneric obj12;
  182.     DPSBinObjGeneric obj13;
  183.     DPSBinObjGeneric obj14;
  184.     DPSBinObjGeneric obj15;
  185.     DPSBinObjGeneric obj16;
  186.     DPSBinObjGeneric obj17;
  187.     DPSBinObjGeneric obj18;
  188.     DPSBinObjGeneric obj19;
  189.     DPSBinObjGeneric obj20;
  190.     DPSBinObjGeneric obj21;
  191.     DPSBinObjGeneric obj22;
  192.     DPSBinObjGeneric obj23;
  193.     DPSBinObjGeneric obj24;
  194.     DPSBinObjGeneric obj25;
  195.     } _dpsQ;
  196.   static const _dpsQ _dpsStat = {
  197.     DPS_DEF_TOKENTYPE, 16, 244,
  198.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* BGC */
  199.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGColor */
  200.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  201.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* BGCS */
  202.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGColorStr */
  203.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  204.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* BGWS */
  205.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGWidthStr */
  206.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  207.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* BGR */
  208.     {DPS_LITERAL|DPS_ARRAY, 0, 4, 208},    /* param[const]: BGrect */
  209.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  210.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* EV */
  211.     {DPS_EXEC|DPS_ARRAY, 0, 10, 128},
  212.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  213.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  214.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* BGC */
  215.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  216.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* BGR */
  217.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  218.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128},    /* rectfill */
  219.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* BGCS */
  220.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  221.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* BGWS */
  222.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  223.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 129},    /* rectstroke */
  224.     }; /* _dpsQ */
  225.   _dpsQ _dpsF;    /* local copy  */
  226.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  227.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  228.   static long int _dpsCodes[9] = {-1};
  229.   register int _dps_offset = 208;
  230.   {
  231. if (_dpsCodes[0] < 0) {
  232.     static const char * const _dps_names[] = {
  233.     "BGC",
  234.     (char *) 0 ,
  235.     "BGCS",
  236.     (char *) 0 ,
  237.     "BGWS",
  238.     (char *) 0 ,
  239.     "BGR",
  240.     (char *) 0 ,
  241.     "EV"};
  242.     long int *_dps_nameVals[9];
  243.     _dps_nameVals[0] = &_dpsCodes[0];
  244.     _dps_nameVals[1] = &_dpsCodes[1];
  245.     _dps_nameVals[2] = &_dpsCodes[2];
  246.     _dps_nameVals[3] = &_dpsCodes[3];
  247.     _dps_nameVals[4] = &_dpsCodes[4];
  248.     _dps_nameVals[5] = &_dpsCodes[5];
  249.     _dps_nameVals[6] = &_dpsCodes[6];
  250.     _dps_nameVals[7] = &_dpsCodes[7];
  251.     _dps_nameVals[8] = &_dpsCodes[8];
  252.  
  253.     DPSMapNames(_dpsCurCtxt, 9, _dps_names, _dps_nameVals);
  254.     }
  255.   }
  256.  
  257.   _dpsF = _dpsStat;    /* assign automatic variable */
  258.  
  259.   _dpsP[1].val.realVal = BGColor;
  260.   _dpsP[4].val.realVal = BGColorStr;
  261.   _dpsP[7].val.realVal = BGWidthStr;
  262.   _dpsP[0].val.nameVal = _dpsCodes[0];
  263.   _dpsP[16].val.nameVal = _dpsCodes[1];
  264.   _dpsP[3].val.nameVal = _dpsCodes[2];
  265.   _dpsP[21].val.nameVal = _dpsCodes[3];
  266.   _dpsP[6].val.nameVal = _dpsCodes[4];
  267.   _dpsP[23].val.nameVal = _dpsCodes[5];
  268.   _dpsP[9].val.nameVal = _dpsCodes[6];
  269.   _dpsP[18].val.nameVal = _dpsCodes[7];
  270.   _dpsP[12].val.nameVal = _dpsCodes[8];
  271.   _dpsP[10].val.arrayVal = _dps_offset;
  272.   _dps_offset += 4 * sizeof(DPSBinObjGeneric);
  273.  
  274.   _dpsF.nBytes = _dps_offset+4;
  275.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,212);
  276.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
  277. }
  278. #line 73 "ControlViewWraps.psw"
  279.  
  280. #line 281 "ControlViewWraps.c"
  281. void PSWEraseView( void )
  282. {
  283.   typedef struct {
  284.     unsigned char tokenType;
  285.     unsigned char topLevelCount;
  286.     unsigned short nBytes;
  287.  
  288.     DPSBinObjGeneric obj0;
  289.     } _dpsQ;
  290.   static const _dpsQ _dpsStat = {
  291.     DPS_DEF_TOKENTYPE, 1, 12,
  292.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* EV */
  293.     }; /* _dpsQ */
  294.   _dpsQ _dpsF;    /* local copy  */
  295.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  296.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  297.   static long int _dpsCodes[1] = {-1};
  298.   {
  299. if (_dpsCodes[0] < 0) {
  300.     static const char * const _dps_names[] = {
  301.     "EV"};
  302.     long int *_dps_nameVals[1];
  303.     _dps_nameVals[0] = &_dpsCodes[0];
  304.  
  305.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  306.     }
  307.   }
  308.  
  309.   _dpsF = _dpsStat;    /* assign automatic variable */
  310.  
  311.   _dpsP[0].val.nameVal = _dpsCodes[0];
  312.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,12);
  313. }
  314. #line 77 "ControlViewWraps.psw"
  315.  
  316. #line 317 "ControlViewWraps.c"
  317. void PSWBasic(float X, float Y, char *Figure, char *Op)
  318. {
  319.   typedef struct {
  320.     unsigned char tokenType;
  321.     unsigned char sizeFlag;
  322.     unsigned short topLevelCount;
  323.     unsigned long nBytes;
  324.  
  325.     DPSBinObjReal obj0;
  326.     DPSBinObjReal obj1;
  327.     DPSBinObjGeneric obj2;
  328.     DPSBinObjGeneric obj3;
  329.     } _dpsQ;
  330.   static const _dpsQ _dpsStat = {
  331.     DPS_DEF_TOKENTYPE, 0, 4, 40,
  332.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  333.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  334.     {DPS_EXEC|DPS_NAME, 0, 0, 32},    /* param Figure */
  335.     {DPS_EXEC|DPS_NAME, 0, 0, 32},    /* param Op */
  336.     }; /* _dpsQ */
  337.   _dpsQ _dpsF;    /* local copy  */
  338.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  339.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  340.   register int _dps_offset = 32;
  341.   _dpsF = _dpsStat;    /* assign automatic variable */
  342.  
  343.   _dpsP[0].val.realVal = X;
  344.   _dpsP[1].val.realVal = Y;
  345.   _dpsP[2].length = strlen(Figure);
  346.   _dpsP[3].length = strlen(Op);
  347.   _dpsP[3].val.stringVal = _dps_offset;
  348.   _dps_offset += (_dpsP[3].length + 3) & ~3;
  349.   _dpsP[2].val.stringVal = _dps_offset;
  350.   _dps_offset += (_dpsP[2].length + 3) & ~3;
  351.  
  352.   _dpsF.nBytes = _dps_offset+8;
  353.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,40);
  354.   DPSWriteStringChars(_dpsCurCtxt, (char *)Op, _dpsP[3].length);
  355.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[3].length + 3) & 3);
  356.   DPSWriteStringChars(_dpsCurCtxt, (char *)Figure, _dpsP[2].length);
  357.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[2].length + 3) & 3);
  358. }
  359. #line 81 "ControlViewWraps.psw"
  360.  
  361. #line 362 "ControlViewWraps.c"
  362. void PSWUserPath(float Pts[], int Tot_Pts, char Ops[], int Tot_Ops, char *Op)
  363. {
  364.   typedef struct {
  365.     unsigned char tokenType;
  366.     unsigned char sizeFlag;
  367.     unsigned short topLevelCount;
  368.     unsigned long nBytes;
  369.  
  370.     DPSBinObjGeneric obj0;
  371.     DPSBinObjGeneric obj1;
  372.     DPSBinObjGeneric obj2;
  373.     DPSBinObjGeneric obj3;
  374.     } _dpsQ;
  375.   static const _dpsQ _dpsStat = {
  376.     DPS_DEF_TOKENTYPE, 0, 2, 40,
  377.     {DPS_LITERAL|DPS_ARRAY, 0, 2, 16},
  378.     {DPS_EXEC|DPS_NAME, 0, 0, 32},    /* param Op */
  379.     {DPS_LITERAL|DPS_STRING, 0, 0, 32},    /* param[var]: Pts */
  380.     {DPS_LITERAL|DPS_STRING, 0, 0, 32},    /* param Ops */
  381.     }; /* _dpsQ */
  382.   unsigned char HNumHeader[4];
  383.   _dpsQ _dpsF;    /* local copy  */
  384.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  385.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  386.   register int _dps_offset = 32;
  387.   _dpsF = _dpsStat;    /* assign automatic variable */
  388.  
  389.   _dpsP[2].length = (Tot_Pts * sizeof(float)) + 4;
  390.   _dpsP[3].length = Tot_Ops;
  391.   _dpsP[1].length = strlen(Op);
  392.   _dpsP[3].val.stringVal = _dps_offset;
  393.   _dps_offset += (Tot_Ops + 3) & ~3;
  394.   _dpsP[2].val.stringVal = _dps_offset;
  395.   _dps_offset += (Tot_Pts * sizeof(float)) + 4;
  396.   _dpsP[1].val.stringVal = _dps_offset;
  397.   _dps_offset += (_dpsP[1].length + 3) & ~3;
  398.  
  399.   _dpsF.nBytes = _dps_offset+8;
  400.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,40);
  401.   DPSWriteStringChars(_dpsCurCtxt, (char *)Ops, Tot_Ops);
  402.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(Tot_Ops + 3) & 3);
  403.   HNumHeader[0] = 149;
  404.   HNumHeader[1] = 48 + ((DPS_DEF_TOKENTYPE % 2) * 128)
  405.                 + ((DPS_DEF_TOKENTYPE >= 130) ? 1 : 0);
  406.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 2 : 3] = (unsigned char) Tot_Pts;
  407.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 3 : 2] = (unsigned char) (Tot_Pts >> 8);
  408.   DPSWriteStringChars(_dpsCurCtxt, (char *)HNumHeader, 4);
  409.   DPSWriteStringChars(_dpsCurCtxt, (char *)Pts, Tot_Pts * sizeof(float));
  410.   DPSWriteStringChars(_dpsCurCtxt, (char *)Op, _dpsP[1].length);
  411.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[1].length + 3) & 3);
  412. }
  413. #line 85 "ControlViewWraps.psw"
  414.  
  415. #line 416 "ControlViewWraps.c"
  416. void PSWRectDraw(float XYScratch[], int j, char *rectOp)
  417. {
  418.   typedef struct {
  419.     unsigned char tokenType;
  420.     unsigned char sizeFlag;
  421.     unsigned short topLevelCount;
  422.     unsigned long nBytes;
  423.  
  424.     DPSBinObjGeneric obj0;
  425.     DPSBinObjGeneric obj1;
  426.     } _dpsQ;
  427.   static const _dpsQ _dpsStat = {
  428.     DPS_DEF_TOKENTYPE, 0, 2, 24,
  429.     {DPS_LITERAL|DPS_STRING, 0, 0, 16},    /* param[var]: XYScratch */
  430.     {DPS_EXEC|DPS_NAME, 0, 0, 16},    /* param rectOp */
  431.     }; /* _dpsQ */
  432.   unsigned char HNumHeader[4];
  433.   _dpsQ _dpsF;    /* local copy  */
  434.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  435.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  436.   register int _dps_offset = 16;
  437.   _dpsF = _dpsStat;    /* assign automatic variable */
  438.  
  439.   _dpsP[0].length = (j * sizeof(float)) + 4;
  440.   _dpsP[1].length = strlen(rectOp);
  441.   _dpsP[1].val.stringVal = _dps_offset;
  442.   _dps_offset += (_dpsP[1].length + 3) & ~3;
  443.   _dpsP[0].val.stringVal = _dps_offset;
  444.   _dps_offset += (j * sizeof(float)) + 4;
  445.  
  446.   _dpsF.nBytes = _dps_offset+8;
  447.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,24);
  448.   DPSWriteStringChars(_dpsCurCtxt, (char *)rectOp, _dpsP[1].length);
  449.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[1].length + 3) & 3);
  450.   HNumHeader[0] = 149;
  451.   HNumHeader[1] = 48 + ((DPS_DEF_TOKENTYPE % 2) * 128)
  452.                 + ((DPS_DEF_TOKENTYPE >= 130) ? 1 : 0);
  453.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 2 : 3] = (unsigned char) j;
  454.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 3 : 2] = (unsigned char) (j >> 8);
  455.   DPSWriteStringChars(_dpsCurCtxt, (char *)HNumHeader, 4);
  456.   DPSWriteStringChars(_dpsCurCtxt, (char *)XYScratch, j * sizeof(float));
  457. }
  458. #line 89 "ControlViewWraps.psw"
  459.  
  460. #line 461 "ControlViewWraps.c"
  461. void PSWShow(float X, float Y, char *Char)
  462. {
  463.   typedef struct {
  464.     unsigned char tokenType;
  465.     unsigned char sizeFlag;
  466.     unsigned short topLevelCount;
  467.     unsigned long nBytes;
  468.  
  469.     DPSBinObjReal obj0;
  470.     DPSBinObjReal obj1;
  471.     DPSBinObjGeneric obj2;
  472.     DPSBinObjGeneric obj3;
  473.     DPSBinObjGeneric obj4;
  474.     } _dpsQ;
  475.   static const _dpsQ _dpsStat = {
  476.     DPS_DEF_TOKENTYPE, 0, 5, 48,
  477.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  478.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  479.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  480.     {DPS_LITERAL|DPS_STRING, 0, 0, 40},    /* param Char */
  481.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 160},    /* show */
  482.     }; /* _dpsQ */
  483.   _dpsQ _dpsF;    /* local copy  */
  484.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  485.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  486.   register int _dps_offset = 40;
  487.   _dpsF = _dpsStat;    /* assign automatic variable */
  488.  
  489.   _dpsP[0].val.realVal = X;
  490.   _dpsP[1].val.realVal = Y;
  491.   _dpsP[3].length = strlen(Char);
  492.   _dpsP[3].val.stringVal = _dps_offset;
  493.   _dps_offset += (_dpsP[3].length + 3) & ~3;
  494.  
  495.   _dpsF.nBytes = _dps_offset+8;
  496.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,48);
  497.   DPSWriteStringChars(_dpsCurCtxt, (char *)Char, _dpsP[3].length);
  498.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[3].length + 3) & 3);
  499. }
  500. #line 93 "ControlViewWraps.psw"
  501.  
  502. #line 503 "ControlViewWraps.c"
  503. void PSWXYShow(float X, float Y, char *CharString, float XYCoords[], int j)
  504. {
  505.   typedef struct {
  506.     unsigned char tokenType;
  507.     unsigned char sizeFlag;
  508.     unsigned short topLevelCount;
  509.     unsigned long nBytes;
  510.  
  511.     DPSBinObjReal obj0;
  512.     DPSBinObjReal obj1;
  513.     DPSBinObjGeneric obj2;
  514.     DPSBinObjGeneric obj3;
  515.     DPSBinObjGeneric obj4;
  516.     DPSBinObjGeneric obj5;
  517.     } _dpsQ;
  518.   static const _dpsQ _dpsStat = {
  519.     DPS_DEF_TOKENTYPE, 0, 6, 56,
  520.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  521.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  522.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  523.     {DPS_LITERAL|DPS_STRING, 0, 0, 48},    /* param CharString */
  524.     {DPS_LITERAL|DPS_STRING, 0, 0, 48},    /* param[var]: XYCoords */
  525.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 195},    /* xyshow */
  526.     }; /* _dpsQ */
  527.   unsigned char HNumHeader[4];
  528.   _dpsQ _dpsF;    /* local copy  */
  529.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  530.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  531.   register int _dps_offset = 48;
  532.   _dpsF = _dpsStat;    /* assign automatic variable */
  533.  
  534.   _dpsP[0].val.realVal = X;
  535.   _dpsP[1].val.realVal = Y;
  536.   _dpsP[3].length = strlen(CharString);
  537.   _dpsP[4].length = (j * sizeof(float)) + 4;
  538.   _dpsP[4].val.stringVal = _dps_offset;
  539.   _dps_offset += (j * sizeof(float)) + 4;
  540.   _dpsP[3].val.stringVal = _dps_offset;
  541.   _dps_offset += (_dpsP[3].length + 3) & ~3;
  542.  
  543.   _dpsF.nBytes = _dps_offset+8;
  544.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,56);
  545.   HNumHeader[0] = 149;
  546.   HNumHeader[1] = 48 + ((DPS_DEF_TOKENTYPE % 2) * 128)
  547.                 + ((DPS_DEF_TOKENTYPE >= 130) ? 1 : 0);
  548.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 2 : 3] = (unsigned char) j;
  549.   HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 3 : 2] = (unsigned char) (j >> 8);
  550.   DPSWriteStringChars(_dpsCurCtxt, (char *)HNumHeader, 4);
  551.   DPSWriteStringChars(_dpsCurCtxt, (char *)XYCoords, j * sizeof(float));
  552.   DPSWriteStringChars(_dpsCurCtxt, (char *)CharString, _dpsP[3].length);
  553.   DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[3].length + 3) & 3);
  554. }
  555. #line 97 "ControlViewWraps.psw"
  556.  
  557.  
  558.